
import 'dart:convert';

ProfileSettings profileSettingsFromJson(String str) =>
    ProfileSettings.fromJson(json.decode(str));

String profileSettingsToJson(ProfileSettings data) =>
    json.encode(data.toJson());

class ProfileSettings {
  ProfileSettings({
    this.id,
    this.quizAudio,
    this.lang,
    this.language,
    this.audio,
    this.music,
    this.pinyin,
    this.dictionary,
    this.timestampCreated,
  });

  String? id;
  bool? quizAudio;
  String? lang;
  String? language;
  bool? audio;
  bool? music;
  bool? pinyin;
  bool? dictionary;
  int? timestampCreated;

  factory ProfileSettings.fromJson(Map<String, dynamic> json) =>
      ProfileSettings(
        id: json["id"],
        quizAudio: json["quizAudio"],
        lang: json["lang"],
        language: json["language"],
        audio: json["audio"],
        music: json["music"],
        pinyin: json["pinyin"],
        dictionary: json["dictionary"],
        timestampCreated: json["timestampCreated"],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "quizAudio": quizAudio,
        "lang": lang,
        "language": language,
        "audio": audio,
        "music": music,
        "pinyin": pinyin,
        "dictionary": dictionary,
        "timestampCreated": timestampCreated,
      };
}
